 class Student {
    private String name;
    private int ID;
    private int javaGrade;

    public Student(String name,int ID,int javaGrade) {
	this.name = name;
	this.ID = ID;
	this.javaGrade = javaGrade;
    }

    public String getName() {
	return name;
    }

    public void setName(String name) {
	this.name = name;
    }

    public int getID() {
	return ID;
    }

    public void setID(int ID) {
	this.ID = ID;
    }

    public int getJavaGrade() {
	return javaGrade;
    }

    public void setJavaGrade(int javaGrade) {
	this.javaGrade = javaGrade;
    }

@Override
    public boolean equals(Object other) {
    if (this == other) {
	    return true;
    }
    if(other == null) {
	    return false;
    }
    if (!(other instanceof Student)) {
	    return false;
    }
    final Student student = (Student) other;
    if(!(this.getName()==student.getName())) {
	    return false;
    }
    if(!(this.getID()==student.getID())) {
	    return false;
    }
    if(!(this.getJavaGrade()==student.getJavaGrade())) {
	    return false;
    }
    return true;
  }
}

public class Test {
     public static void main(String[] args) {
	   Student student1=new Student("cat",20155340,100);
	   Student student2=new Student("dog",20155341,90);
	   Student student3=student1;//new Student("fish",20155342,40);
	   if(student1.equals(student2)) {
	        System.out.println("student1.equals student2");
	   }
	   else {
	       System.out.println("!student1.equals student2");
	   }
	   if(student1.equals(student3)) {
	        System.out.println("student1.equals student3");
	   }
	   else {
		System.out.println("!student1.equals student3");
	   }
	   
  }

}
